package com.kim.nidoya.activity;

import com.kim.nidoya.R;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

@SuppressWarnings("deprecation")
public class TabMainActivity extends android.app.TabActivity {
	/** Called when the activity is first created. */
	private TabHost tabhost;
	private Intent intent1, intent2, intent3, intent4;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tab_layout);
		tabhost = getTabHost();

		intent1 = new Intent(TabMainActivity.this, FirstGroup.class);
		tabhost.addTab(tabhost
				.newTabSpec("one")
				.setIndicator(
						"电话",
						getResources().getDrawable(
								R.drawable.personal_center))
				.setContent(intent1));

		intent2 = new Intent(TabMainActivity.this, Test_02.class);
		tabhost.addTab(tabhost
				.newTabSpec("two")
				.setIndicator(
						"",
						getResources().getDrawable(
								R.drawable.media_zone))
				.setContent(intent2));

		intent3 = new Intent(TabMainActivity.this, Test_01.class);
		tabhost.addTab(tabhost
				.newTabSpec("three")
				.setIndicator(
						"分享",
						getResources().getDrawable(
								R.drawable.agent_and_join))
				.setContent(intent3));

		intent4 = new Intent(TabMainActivity.this, Test_02.class);
		tabhost.addTab(tabhost
				.newTabSpec("four")
				.setIndicator(
						"更多",
						getResources().getDrawable(
								R.drawable.settings))
				.setContent(intent4));
	}
}
